package com.ruoyi.boc.service.impl;

import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;

import com.ruoyi.boc.domain.BocLakeTable;
import com.ruoyi.boc.mapper.BocLakeTableMapper;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.boc.mapper.BocLakeTableColumnMapper;
import com.ruoyi.boc.domain.BocLakeTableColumn;
import com.ruoyi.boc.service.IBocLakeTableColumnService;

/**
 * 入湖字段Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-17
 */
@Service
public class BocLakeTableColumnServiceImpl implements IBocLakeTableColumnService
{
    @Autowired
    private BocLakeTableMapper bocLakeTableMapper;
    @Autowired
    private BocLakeTableColumnMapper bocLakeTableColumnMapper;

    /**
     * 查询入湖字段
     * 
     * @param columnId 入湖字段主键
     * @return 入湖字段
     */
    @Override
    public BocLakeTableColumn selectBocLakeTableColumnByColumnId(Long columnId)
    {
        return bocLakeTableColumnMapper.selectBocLakeTableColumnByColumnId(columnId);
    }

    /**
     * 查询入湖字段列表
     * 
     * @param bocLakeTableColumn 入湖字段
     * @return 入湖字段
     */
    @Override
    public List<BocLakeTableColumn> selectBocLakeTableColumnList(BocLakeTableColumn bocLakeTableColumn)
    {
        return bocLakeTableColumnMapper.selectBocLakeTableColumnList(bocLakeTableColumn);
    }

    /**
     * 新增入湖字段
     * 
     * @param bocLakeTableColumn 入湖字段
     * @return 结果
     */
    @Override
    public int insertBocLakeTableColumn(BocLakeTableColumn bocLakeTableColumn)
    {
        bocLakeTableColumn.setCreateTime(DateUtils.getNowDate());
        return bocLakeTableColumnMapper.insertBocLakeTableColumn(bocLakeTableColumn);
    }

    /**
     * 修改入湖字段
     * 
     * @param bocLakeTableColumn 入湖字段
     * @return 结果
     */
    @Override
    public int updateBocLakeTableColumn(BocLakeTableColumn bocLakeTableColumn)
    {
        bocLakeTableColumn.setUpdateTime(DateUtils.getNowDate());
        return bocLakeTableColumnMapper.updateBocLakeTableColumn(bocLakeTableColumn);
    }

    /**
     * 批量删除入湖字段
     * 
     * @param columnIds 需要删除的入湖字段主键
     * @return 结果
     */
    @Override
    public int deleteBocLakeTableColumnByColumnIds(Long[] columnIds)
    {
        return bocLakeTableColumnMapper.deleteBocLakeTableColumnByColumnIds(columnIds);
    }

    /**
     * 删除入湖字段信息
     * 
     * @param columnId 入湖字段主键
     * @return 结果
     */
    @Override
    public int deleteBocLakeTableColumnByColumnId(Long columnId)
    {
        return bocLakeTableColumnMapper.deleteBocLakeTableColumnByColumnId(columnId);
    }

    @Override
    public int deleteBocLakeTableColumnByTableIds(Long[] tableIds) {
        return bocLakeTableColumnMapper.deleteBocLakeTableColumnByTableIds(tableIds);
    }
}
